package com.lvyq.myplayer.model.current
import androidx.lifecycle.ViewModel
import androidx.lifecycle.ViewModelProvider
import com.lvyq.myplayer.dao.CurrentPlayLstDao
import com.lvyq.myplayer.dao.PlayCacheDao

/**
 * 文件描述：PlayCacheViewModelFactory
 * 作者：lvyq
 * 创建时间：2025-06-16
 * 修改时间：2025-06-16
 */

class CurrentPlayLstViewModelFactory(private val currentPlayLstDao: CurrentPlayLstDao) : ViewModelProvider.Factory {
    override fun <T : ViewModel> create(modelClass: Class<T>): T {
        if (modelClass.isAssignableFrom(CurrentPlayLstViewModel::class.java)) {
            return CurrentPlayLstViewModel(currentPlayLstDao) as T
        }
        throw IllegalArgumentException("Unknown ViewModel class")
    }
}